#include <iostream>
using namespace std;

#include "interestTable.h"
#include "person.h"
#include "couple.h"
#include "couplesList.h"
#include "personList.h"
#include "dating.h"

void mainInterestTable()
{
	interestTable i1, i2;
	i1.add("bio");
	i1.add("dans");
	i2.add("bio");
	i2.add("resor");
	i2.add("djur");
	i1.print();
	i2.print();
	cout << "gemensamma intressen: " << i1.compare(i2) << endl;
}

void mainPerson()
{
	person p1("max;boy;bio;datorspel;resor");
	person p2("a;boy;bio;resor");
	if (p1 < p2)
	{
		p1.print();
	}
	else
	{
		p2.print();
	}
	cout << "gemensamma intressen: " << p1.numEqualInterests(p2) << endl;
}

void mainCouple()
{
	person max("max;boy");
	person matilda("matilda;girl");
	person sebbe("sebbe;boy");
	person johanna("johanna;girl");

	couple c1(max, matilda);
	couple c2(sebbe, johanna);

	if (c1 > c2)
	{
		c1.print();
	}
	else
	{
		c2.print();
	}
}

void mainCouplesList(){
	person a("a;boy");
	person b("b;girl");
	person c("c;boy");
	person d("d;girl");
	person e("e;boy");
	person f("f;girl");
	person g("g;boy");
	person h("h;girl");
	person i("i;boy");
	person j("j;girl");
	couple c1(a, b);
	couple c2(c, d);
	couple c3(e, f);
	couple c4(g, h);
	couple c5(i, j);

	couplesList cl;
	cl.add(c1);
	cl.add(c5);
	cl.add(c4);
	cl.add(c2);
	cl.add(c3);

	cl.print();
}

void mainPersonList()
{
	person p1("max;boy;bio;datorspel;resor");
	person p2("a;boy;bio;resor");
	person p3("matilda;girl;resor");
	personList pl;
	pl.add(p1);
	pl.add(p2);
	pl.print();
	pl.remove(p2);
	pl.print();
}

void mainDate()
{
	dating d(0);
	d.readFromFile();
	d.print();
	d.match();
	d.print();
}

int main()
{
	//mainInterestTable();
	//mainPerson();
	//mainCouple();
	//mainCouplesList();
	//mainPersonList();
	mainDate();
	system("pause");
	return 0;
}